var e = require;
var t = module;
var o = exports;
var n = o;
Object.defineProperty(n, "__esModule", {value: !0}),
    (n.adAssetsMap = void 0),
    (n.adAssetsMap = {
        prefabs: {
            NativeBanner: "",
            NativeInterstitial: "",
            NativeInterstitial_hw: "",
            NativeInterstitial_oppo: "",
            NativeInterstitial_vivo: "",
            NativePatch_Default: "",
            NativeGeneralAd: "",
            NativePatch_1: "",
            NativePatch_2: "",
            NativePatch_3: "",
            NativePatch_4: "",
            NativePatch_5: ""
        }
    });
var i = (function () {
    function e() {
        (this._adBundle = null), (this._bundleName = "");
    }
    return (
        Object.defineProperty(e, "instance", {
            get: function () {
                return e._instance || (e._instance = new e()), e._instance;
            },
            enumerable: !1,
            configurable: !0
        }),
        (e.prototype.loadBund = function () {}),
        (e.prototype.loadRes = function (e, t) {
            var o = this;
            return new Promise(function (n, i) {
                o._adBundle.load(
                    e,
                    t,
                    function () {},
                    function (e, t) {
                        e ? i(e) : n(t);
                    }
                );
            });
        }),
        (e.prototype.createNodeByPreloading = function (e) {
            if (!this._adBundle)
                return console.error("UIManager", "createNodeByPreloading error,bundle ad_assets unloaded"), null;
            var t = this._adBundle.get(e, cc.Prefab);
            if (!t || null == t)
                return console.error("UIManager", "createNodeByPreloading error,url: " + e + "  unloaded"), null;
            if (!(t instanceof cc.Prefab))
                return console.error("UIManager", "createNodeByPreloading error,url: " + e + "  not prefab"), null;
            var o = cc.instantiate(t);
            return o && null != o
                ? o
                : (console.error("UIManager", "createNodeByPreloading fail,url: " + e + "  create node is null"), null);
        }),
        (e._instance = null),
        e
    );
})();
n.default = i;
